package com.t2two.example.common;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @version 1.0
 * @description: TODO
 * @author: lifei
 * @date: 2023/8/23 16:19
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomException extends RuntimeException{

    private String code;

    public CustomException(String code, String message){
        super(message);
        this.code = code;
    }

    public CustomException(Integer code, String message){
        super(message);
        this.code = String.valueOf(code);
    }

    public CustomException(String message){
        super(message);
        this.code = "500";
    }
}
